﻿using System;
using System.Linq;
using System.Linq.Expressions;
using System.Runtime.CompilerServices;
using Volo.Abp.Linq;

namespace Xms.Abp.Linq;

public interface IQueryableExecuter : IAsyncQueryableExecuter
{
    IQueryable<T> AsNoTracking<T>(IQueryable<T> queryable)
        where T : class;
    IQueryable<T> Include<T, TProperty>(IQueryable<T> queryable, Expression<Func<T, TProperty>> navigationPropertyPath)
        where T : class;
    IQueryable<T> Include<T>(IQueryable<T> queryable, string navigationPropertyPath)
        where T : class;
    IQueryable<T> ThenInclude<T, TPreviousProperty, TProperty>(IQueryable<T> queryable, Expression<Func<TPreviousProperty, TProperty>> navigationPropertyPath)
        where T : class;
    IQueryable<T> IncludeIf<T, TProperty>(IQueryable<T> queryable, bool isInclude, Expression<Func<T, TProperty>> navigationPropertyPath)
        where T : class;
    IQueryable<T> IncludeIf<T>(IQueryable<T> queryable, bool isInclude, string navigationPropertyPath)
        where T : class;
    IQueryable<T> ThenIncludeIf<T, TPreviousProperty, TProperty>(IQueryable<T> queryable, bool isInclude, Expression<Func<TPreviousProperty, TProperty>> navigationPropertyPath)
        where T : class;
    IQueryable<T> IgnoreAutoIncludes<T>(IQueryable<T> queryable)
        where T : class;
    IQueryable<T> IgnoreQueryFilters<T>(IQueryable<T> queryable)
        where T : class;
    IQueryable<T> TagWith<T>(IQueryable<T> queryable, string tag)
        where T : class;
    IQueryable<T> TagWithCallSite<T>(IQueryable<T> queryable, [CallerFilePath] string filePath = null, [CallerLineNumber] int lineNumber = 0)
        where T : class;
    string ToQueryString<T>(IQueryable<T> queryable)
        where T : class;
    string ToString<T>(IQueryable<T> queryable)
        where T : class;
    IQueryable<TResult> ProjectTo<T, TResult>(IQueryable<T> queryable)
        where T : class
        where TResult : class, new();
}
